package com.nuoye.appletstyle;

import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;

import android.content.Intent;
import android.os.Bundle;

import com.nuoye.appletstyle.databinding.ActivityMainBinding;

public class MainActivity extends AppCompatActivity {

    private ActivityMainBinding binding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
        // 通过tag 打开界面呢。
        binding.tvTagIntent.setOnClickListener(view -> {
            Intent intent = new Intent(this, TagActivity.class);
            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
            intent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
            startActivity(intent);
        });
        binding.tvManifest.setOnClickListener(view -> {
            startActivity(new Intent(view.getContext(),ManifestActivity.class));
        });
    }
}